<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>

</head>
<body>
<div>
    <%if(d==0){%>
    <form action="/mycenter/addcolumn" method="post">
        <p>栏目名称：<input type="text" name="name" value=""></p>
        <p>栏目关键字：<input type="text" name="key" value=""></p>
        <p>栏目说明：<textarea name="desc"></textarea></p>
        <p>栏目排序：<input type="text" name="pid" value="0">(从大到小排序)</p>
        <p>所属栏目：<select name="fid">

                <option value="0" selected="selected">父栏目</option>
                <% columnlist.forEach(function(data){ %>
                    <%if(data.length>1){%>
                      <%for(var i=0;i<data.length;i++){%>
                      <%if(i==0){%>
                      <option tue="1" value="<%=data[i]._id%>"><%=data[i].name%></option>
                      <%}else{%>
                      <option tue="1" value="<%=data[i]._id%>">——<%=data[i].name%></option>
                      <%}}%>
                <%}else{%>
                    <option  value="<%=data._id%>"><%=data.name%></option>
                    <%}%>
                <%})%>
            </select></p>
        <p><input type="submit"> </p>
    </form>
  <%}else{%>
     <p>恭喜你，添加栏目成功！</p>
  <%}%>
</div>
</body>
</html>